<template>
  <PageTemplate ref="pageTemplate" :isShowTableCheckbox='false' :tableRequest="tableRequest"
                :toolButtonList="allToolBtns" :metaDataRequestParams="metaDataRequestParams"
                @onToolClick="handleToolClick" :tableSlotNames="tableSlotNames"
                @onRowClick="onRowClick" @onMetaDataChange="metaDataChangeHandle">
    <!-- 标题 -->
    <span slot="subject" slot-scope="{ text, record }">
      <SubjectTableRender :slotData="record"></SubjectTableRender>
    </span>
  </PageTemplate>
</template>
<script>
import PageTemplate from '../../../components/page-template';
import toAndFromMixins from '../mixins/toAndFromMixins';
// 表格slot组件
import SubjectTableRender from '../components/subject-table-render.vue';
import { getParams } from "@/utils";

const urlParamObj = getParams(window.location.search);
export default {
  name: 'SentListFromMe',
  mixins: [toAndFromMixins],
  components: {
    PageTemplate,
    SubjectTableRender
  },
  data() {
    return {};
  },
  created() {
    this.metaDataRequestParams = {
      key: 'LIST_SENT_HANDOVER_FROM_ME',
      platform: 0,
    };
    this.handoverType = 'fromMe';
  },
  computed: {
    tableRequest() {
      const { dataType, deduplication, aiProcessing } = this;
      return {
        url: '/ajax.do?method=ajaxAction&managerName=handoverManager',
        managerMethod: 'listAffairs',
        otherArgs: {
          state: "2", // 
          type: 'fromMe',
          deduplication,
          dumpData: dataType === '1' ? "true" : "false",
          templeteIds: urlParamObj.textfield || '',
          aiProcessing: aiProcessing
        }
      };
    },
  }
};
</script>
